clear
version 8.0
#delimit ;
cd "Z:\interactionmodels\";                       * SET WORKING DIRECTORY;
log using results\legislativeparties.log, replace;

*     ***************************************************************** *;
*     ***************************************************************** *;
*       File-Name:      legislativeparties.do                           *;
*       Date:           01/11/2007                                      *;
*       Author:         MRG                                             *;
*       Purpose:        Provide results for legislative parties, Table 1*;
*       Input File:     STATA_mozaffar.dta, golder1.dta                 *;
*       Output File:    legislativeparties.log                          *;
*       Data Output:    none                                            *;
*       Previous file:                                                  *;
*       Machine:                                                        *;
*     ****************************************************************  *;
*     ****************************************************************  *;

set mem 10m;

use getdata\STATA_mozaffar.dta;

*     ****************************************************************  *;
*                         Institutional Model                           *;
*     ****************************************************************  *;

regress legparties logmag10 proximity prescandidate prox_prescandidate, robust;

*     ****************************************************************  *;
*                           Sociological Model                          *;
*     ****************************************************************  *;

regress legparties  fragmentation concentration frag_conc, robust;

*     ****************************************************************  *;
*                       Additive Sociological Model                     *;
*     ****************************************************************  *;

regress legparties  fragmentation concentration frag_conc logmag10 proximity 
        prescandidate prox_prescandidate, robust;

*     ****************************************************************  *;
*                       Interactive Socio-Institutional Model           *;
*     ****************************************************************  *;

regress legparties  fragmentation concentration logmag10 frag_conc logmag10_frag  
logmag10_conc logmag10_frag_conc proximity prescandidate prox_prescandidate, robust;


*     ****************************************************************  *;
*                  Interactive Socio-Institutional Model                *;
*               with corrected data (last column, table 1)              *;
*     ****************************************************************  *;

clear;

use getdata\golder1.dta;

* Now do recode of concentration (see paper fn 3 and p.6 for details)  *;
                     
gen conc1 = concentration;
replace conc1 = 3 if (fragmentation==1 & concentration==0);
gen frag_conc1 = fragmentation*conc1;
gen logmag_conc1_nyu = logmag_nyu*conc1;
gen frag_conc1_logmag_nyu = fragmentation*conc1*logmag_nyu;

replace conc1 = 3 if conc1>3 & conc1!=.;

regress legparties_nyu  fragmentation conc1 logmag_nyu 
        frag_conc_nyu logmag_frag_nyu logmag_conc1_nyu 
        frag_conc1_logmag_nyu proximity_nyu prescandidate_nyu 
        prox_prescandidate_nyu, robust;

*     ****************************************************************  *;
*                       Replication complete.                           *;
*     ****************************************************************  *;          
    
log close;
exit;
